home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / games1 / fsstruct.zip / FSSTRUCT.ADD next >
Text File  |  1993-01-11  |  44KB  |  1,144 lines

  1.  
  2.  
  3.                          MICROSOFT FLIGHT SIMULATOR
  4.                             DATA FILE STRUCTURES
  5.  
  6.                                INTERIM UPDATE
  7.  
  8. Document version 2.2, release date:
  9.  
  10. INTRODUCTION
  11.  
  12. This document is a partial copy of FSSTRUCT.TXT ver. 2.2, yet to be released.
  13. It contains only the parts with significant enhancements and excludes parts
  14. that underwent only cosmetic changes.
  15.  
  16. I would be grateful if you can let me have any suggestion, addition or corre-
  17. tion you think has to be included in the next release of FSSTRUCT, possibly
  18. within 2-3 weeks.
  19.  
  20. It seems to me that the areas which most require our attention are (in a
  21. probable order of importance):
  22.  
  23. ∙ variables: their contents and usage
  24.  
  25. ∙ records remaining to be understood.  Limiting ourselves to F1, there are 3
  26. of them: 0C, 0F, 2E; I'm inclined to believe that 0C and 2E are rather
  27. unimportant; as Andrew Tuline pointed to me, 0F is probably very important
  28. and related to the overall relationship among scenery procedures.
  29.  
  30. ∙ procedure relationships themselves; how procedures are selected for execu-
  31. tion? how procedures belonging to the same region are grouped and properly
  32. layered? It is probable that the answers to these questions and to other
  33. issues outlined in the last section of this document (Notes on file struc-
  34. tures) lie in the sceneries themselves.  To these points is also related the
  35. meaning of 36 and 3C records.
  36.  
  37. ∙ "duplicated" records: what is difference between records 0B and 4B, 17 and
  38. 19, 18 and 1F, 2F and 4A, 3D, 3E and 42?
  39.  
  40. ∙ records only partially understood.  They are: 04, 10 and 27, 13 and 14, 28,
  41. 43, 45 plus the record found only in SC1 (62) and SEE sceneries (4C, 4D, 4E,
  42. 52, 58, 6F).  About these, I would like to draw Dan's attention to records
  43. 10, 27 and 43, because they seem to me to contain a trick similar to the one
  44. he discovered in rec 5A.
  45.  
  46.  
  47. ========================================
  48.  
  49. Appendix: Listing of all the occurrences of record 0F in F1
  50.  
  51. 0001C2  0F 07 06 77 01 00
  52. 0001EB  0F 25 06 4E 01 00
  53. 0001FD  0F 02 06 3C 01 00
  54. 00021E  0F 0A 06 1B 01 00
  55. 000227  0F 09 06 12 01 00
  56. 000248  0F 0E 06 F1 00 00
  57. 000251  0F 0F 05 E8 00 00
  58. 000269  0F 16 05 D0 00 00
  59. 00027B  0F 15 06 BE 00 00
  60. 00028D  0F 08 04 AC 00 00
  61. 0002EE  0F 1B 08 4B 00 00
  62. 000318  0F 23 05 21 00 00
  63. 000321  0F 1E 05 18 00 00
  64. 00032A  0F 24 07 0F 00 00
  65. 000333  0F 01 06 06 00 00
  66. 0061B7  0F 06 06 06 00 02
  67. 00DBE0  0F 0D 01 09 0E 01
  68. 00DC6B  0F 0D 01 7E 0D 01
  69. 00DCF3  0F 0B 02 F6 0C 01
  70. 00DDB3  0F 0B 02 36 0C 01
  71. 00E04B  0F 0D 01 9E 09 01
  72. 00E11F  0F 0D 01 CA 08 01
  73. 00E19F  0F 0C 01 4A 08 01
  74. 00E264  0F 0C 01 85 07 01
  75. 010126  0F 11 01 5C 14 01
  76. 0101F2  0F 11 01 90 13 01
  77. 0102D3  0F 10 01 AF 12 01
  78. 0103B1  0F 10 01 D1 11 01
  79. 011F1D  0F 13 01 25 0D 01
  80. 011FD4  0F 13 01 6E 0C 01
  81. 01218C  0F 14 01 B6 0A 01
  82. 012251  0F 14 01 F1 09 01
  83. 0122D0  0F 12 01 72 09 01
  84. 012396  0F 12 01 AC 08 01
  85. 015984  0F 17 02 14 0A 01
  86. 015A26  0F 17 02 72 09 01
  87. 015AE3  0F 18 01 B5 08 01
  88. 015B69  0F 18 01 2F 08 01
  89. 016209  0F 19 02 8F 01 01
  90. 01BB03  0F 21 03 12 00 01
  91. 01BB0C  0F 1D 04 09 00 01
  92. 01CF85  0F 22 02 86 06 02
  93. 01D0E8  0F 1C 01 23 05 02
  94. 01EEE9  0F 20 02 07 13 01
  95. 01EF3F  0F 1F 02 B1 12 01
  96. 01F0F9  0F 1A 02 F7 10 01
  97. 0220B0  0F 04 06 31 00 01
  98. 0220CE  0F 05 06 13 00 01
  99. 0220D7  0F 03 06 0A 00 01
  100.  
  101. As you may see, byte 1 varies in the range 00h - 25h and there are 26h proce-
  102. dures in F1.
  103.  
  104. ===================== FSSTRUCT.ADD BEGIN =============================
  105. .
  106. .
  107.  
  108. FS COORDINATES AND GEOGRAPHIC UNIT
  109.  
  110. .
  111. .
  112.  
  113. ∙ DELTA (2 bytes): a word representing the difference from an actual
  114. reference coordinate given elsewhere (usually in a previous ref. point record
  115. 24h).
  116. Delta coordinates have not a fixed magnitude, but depend on scale factor
  117. (usually set with byte 1 of record 24h): for scale factor 0, delta coor-
  118. dinates are aligned with the fractionary word of fract. FSu, for scale factor
  119. 8, delta coordinates are aligned with the integer word of fract. FSu, and for
  120. intermediate scale factors intermediate alignments are used; for a detailed
  121. discussion, see below under record 24h description.
  122. Contrarily to the other two representations, which are always positive, this
  123. representation is signed. This representation is indicated as "delta FSu".
  124. .
  125. .
  126. .
  127. VARIABLES
  128.  
  129. FS apparently mantains somewhere in memory a set of 16-byte variables, which
  130. affect the display engine and/or the flight simulation engine.  These vari-
  131. ables are accessed with a value which looks like a memory address and has
  132. been called "variable address". Attested addresses are in the range 0280h -
  133. 0364h.  Variables can be set and tested from within a scenery file.
  134.  
  135. Attested variables in F1 and SC1:
  136.  
  137.  
  138. 0280      read 48 times in F1, never written
  139. 0282      checked 45 times in F1, never written
  140. 0284      Crash flag: when this var is set to a non-0 value, the plane
  141.           crashes; the displayed message depends on the value:
  142.                2         "mountain crash"
  143.                6         "building crash"
  144.                8         "splash"
  145.                Ah        "crash - lower your gear next time"
  146.           Any other value results in a simple "crash" message
  147. 0286      tested 46 times in F1 against 1
  148. 0288      set to 0001 in SC1 fuel boxes; set 15 t. to 1 and once to 2 in F1
  149. 028A      FS version number (0300h = 3, 0400h = 4, 040Bh = 4b), never
  150.           accessed in F1
  151. 028C      holds the daytime code (2 = day; 4 = night; 6 = dusk)?  In F1
  152.           tested 118 t. against 1, 42 t. ag. 2, 45 t. ag. 3, once ag. 4, 32
  153.           t. ag. 6; set 5 t. to 1, set 6 t. to var 02D0 value
  154. 028E      In F1, set 1 time to 1111h
  155. 0290      Low word of current view point East coord. Never accessed in F1,
  156.           but var 0291 (spanning over MSB of var 0290 and LSB of var 0292) is
  157.           checked once
  158. 0292      High word of current view point East coord. Checked very often in
  159.           F1, but obviously never written
  160. 0294      Low word of current view point East coord. Never accessed in F1,
  161.           but var 0295 (spanning over MSB of var 0294 and LSB of var 0296) is
  162.           checked twice
  163. 0296      High word of current view point Alt. coord. Checked many times in
  164.           F1 (9 times even for negative values), but obviously never written
  165. 0298      Low word of current view point North coord. Never accessed in F1,
  166.           but var 0299 (spanning over MSB of var 0298 and LSB of var 029A) is
  167.           checked once
  168. 029A      High word of current view point North coord. Checked very often in
  169.           F1, but obviously never written
  170. 029C      Current delta East  from last ref. point
  171. 029E      Current delta Alt.  from last ref. point
  172. 02A0      Current delta North from last ref. point
  173.  
  174. 02A2 - 02AA    Never accessed in F1
  175.  
  176. 02AC      Checked 15 t. in F1, always in the S. Francisco area. It is perhaps
  177.           related to the view direction
  178.  
  179. 02AE - 02CE    Never checked or set in F1; values of vars 02AE - 02BE,
  180.           however, are sometime assigned to other vars.
  181.  
  182. 02D0 - 02E0    These seem to be 'spare' vars, used here and there to hold
  183.           temporary values or copies of other vars' values
  184.  
  185. 02E2      Surface fill colour; the colour code is repeated in all the four
  186.           nibbles.  In F1, the var is set very often to literal colour codes
  187.           and it is also loaded once with the value of var 02C2, 6 t. with
  188.           value of 02E0, 25 t. with value of 02E6, 8 t. with value of 02E8,
  189.           twice with value of 02EA, and 4 t. each with values of 0314, 0316,
  190.           0318, 031A
  191. 02E4      In F1 set 16 times to 5555h and 16 times to FFFFh
  192. 02E6      Perhaps holds the current water colour (which changes with day
  193.           time); in F1 it is set 16 times to 0000 and 16 times to the value
  194.           of var 02C2
  195. 02E8      Perhaps it holds some standard colour; in F1 it is set 16 t. to
  196.           0000, 14 times to AAAAh, 9 t. to the value of 02C4 and 9 t. to the
  197.           value of 02CC
  198. 02EA      Same as 02E8; in F1 it is set 16 t. to 0000 and 16 t. to the value
  199.           of var 02C6
  200. 02EC      In F1 it is set once to 0023h, once to 0046h, once to 0089h
  201. 02EE      Low word of above sea level altitude of current area in m.  Never
  202.           used in itself but, var 02EF (spanning over MSB of 02EE and LSB of
  203.           02F0) is set in SC1 runways and 155 times in F1 (with values from
  204.           0000 to 0776h).
  205. 02F0      High word of 02EE. Same observations.
  206. 02F2      In F1 it is set 29 t. to values from FEEFh to F667h and from 0000
  207.           to 0FA4h. It clearly holds a signed value.
  208. 02F4      In F1 is is set 13 t. to values from F555h to FD28h and from 0000
  209.           to 0FA4h. It clearly holds a signed value and is perhaps related to
  210.           the previous var.  HYPOTHESIS: both vars are related to 'cant'.
  211. 02F6      Set to 0001 in SC1 inner markers, never reset. Never used in F1.
  212. 02F8      Set to 0001 in SC1 outer markers, never reset. Set 26 times in F1.
  213. 02FA      Set to 0001 in SC1 middle markers, never reset. Set 29 times in F1.
  214. 02FC      Set to glideslope in ILS of .SCN files. Set 9 t. in F1 where,
  215.           however, the record 4Fh is also used 25 times
  216. 02FE      Set to approach course in ILS of .SCN files. Set 9 t. in F1 where,
  217.           however, the record 4Fh is also used 25 times
  218. 0300      In F1, set twice to 0004, twice to 0005, 7 t. to 0007. Never read
  219. 0302      In F1, tested 16 t. against -1 and 6 t. against var 0304 value.
  220.           Never set
  221. 0304      In F1, tested 6 t. against var 0302 value. Never set
  222. 0306      In F1, tested 16 t. against -1. Never set
  223. 0308      In F1, tested 16 t. against var 0280 value. Never set
  224.  
  225. 030A - 0310    Apparently never used in F1 or in SC1 files
  226.  
  227. 0312      Set to 0001 by SEE before some lists of 1Fh subroutine calls. Used
  228.           in F1 as a 'spare' var to hold temporary values or a copy of
  229.           another var value (often a delta altitude)
  230. 0314 - 031C    Used in F1 as 'spare' var
  231. 031E      Set to 0000 and 0001 in SC1 mountains. Unused by F1
  232.  
  233. 0320      In F1 tested 4 t. against 1; set 3 t. to 0000 and 3 t. to 0001
  234.  
  235. 0322 - 034C    Apparently never used in F1 or in SC1 files
  236.  
  237. 034E      In F1 tested once against -1; tested against -1 in SEE custom
  238.           objects (with 23h records) and in SC1 buildings (with 28h 36h
  239.           records).
  240.  
  241. 0350 - 0362    Apparently never used in F1 or in SC1 files
  242.  
  243. 0364      Perhaps holds the scenery detail level (0 sparse, 1 medium, 2 com-
  244.           plex). In F1 tested 3 t. against 2 and 3 t. against 3
  245.  
  246. BYTE OFFSET
  247.  
  248. Many records contain an offset, pointing to another record.  It is used to
  249. provide some forms of inter-record addressing for conditional (after variable
  250. test) or unconditional jumps.  These offsets are indicates as "bytes offset"
  251. and are always relative to first byte (code byte) of the record which con-
  252. tains them.
  253.  
  254.  
  255. ======================================================================
  256.  
  257.                         SCENERY DESCRIPTION LANGUAGE
  258.                         STATIC RECORD CODE REFERENCE
  259.  
  260. Static records are used in three types of files, all related to static
  261. scenery descriptions: the default scenery (F1), alternate sceneries (.SCN)
  262. and ASD static sceneries (.SC1).  Actually, it contains ALL the records found
  263. in F1, SD-EUR.SCN and unenhanced .SC1 files.
  264.  
  265. While static records are geared toward scenery display, they make a real pro-
  266. cedural programming language, which we call Scenery Description Language
  267. (SDL), with variable tests, conditional and unconditional jumps, subroutine
  268. calls and so on.
  269.  
  270. Scenery files are made of several scenery procedures and, within FS4, an SDL
  271. processor 'executes' them to display the scenery and perhaps to act on the
  272. flight simulation itself.  Procedure entry points are listed at fixed loca-
  273. tions of .SC1 and F1 files; such a table has not been localized yet for .SCN
  274. files.
  275.  
  276. Given the procedural nature of SDL, scenery objects do not usually have a
  277. fixed structure, but are made of the SDL statements (records) required to
  278. 'build' them, with the notably exception of unenhanced .SC1 files, which
  279. objects, perhaps to make the job of the ASD editor easier, follow standard
  280. record patterns.
  281.  
  282. In the following reference, all records found in F1, SD-EUR and unenhaced
  283. .SC1 files are listed; some records from SEE enhanced .SC1 files are also
  284. added; for several records, however, the meaning is unknown and only the
  285. length has been determined.
  286.  
  287. Record are listed by code.  Field at offset 0 always contains the record code
  288. and is 1 byte long.
  289.  
  290. Records found only in SD-EUR are marked with =SCN=,
  291. records found only in SEE enhanced sceneries are marked with =SEE=,
  292. records found only in SC1 files are marked with =SC1=,
  293. while records found, even not exclusively, in the default scenery F1 are con-
  294. sidered part of the 'basic' SDL and not marked.
  295.  
  296. Record description contributed by Dan Samuel are marked with an DS.
  297.  
  298.  
  299. -- 00h ------------- Flashing light (7 bytes)
  300.  
  301. 1         2    E coord (delta FSu)
  302. 3         2    A coord (delta FSu)
  303. 5         2    N coord (delta FSu)
  304.  
  305. Places a flashing light at the delta point.  Light colour is given by a
  306. previous record 12h.
  307.  
  308. -- 01h ------------- Move pen to 3D point (7 bytes)
  309. -- 02h ------------- Draw to 3D point     (7 bytes)
  310.  
  311. 1         2    E coord (delta FSu)
  312. 3         2    A coord (delta FSu)
  313. 5         2    N coord (delta FSu)
  314.  
  315. These records, resp., move the pen and draw a line to a 3D point given rela-
  316. tively to a previous ref. point.
  317.  
  318. -- 03h ------------- Simple runway (6 bytes)
  319.  
  320. 1         1    heading
  321. 2         2    half-length in m
  322. 4         2    half-width in m
  323.  
  324. Draws a simple black runway with a dashed line in the middle.
  325.  
  326. -- 04h ------------- ???-point list (variable)
  327.  
  328. This record is used in F1 (only 4 times) after some points are defined with
  329. 31h records and it contains, after the record code, only a list of points
  330. (indicated by their numbers); the list is of variable length and is
  331. terminated by a FFh byte.
  332.  
  333. -- 05h ------------- NDB (11 bytes)
  334.  
  335. 1         2    frequency; BCD coded (ex.: 327 kHZ -> 27h 03h)
  336. 3         4    N coord. (fract. FSu)
  337. 7         4    E coord. (fract. FSu)
  338.  
  339. Note that coordinates are reversed (first North, second East) with respect to
  340. other nav aid records.
  341.  
  342. -- 07h ------------- ??? (1 byte) =SCN=
  343.  
  344. Used only once in SD-EUR
  345.  
  346. -- 0Bh ------DS----- Unconditional jump (3 bytes)
  347.  
  348. 1         2    byte offset
  349.  
  350. This record tells FS to jump over a given amount of bytes, avoiding the
  351. execution of some SDL statements.  It is usually used after a test record to
  352. providing branching to another point of the object definition.
  353.  
  354. It is also used in .SC1 to unconditionally skip over 2-byte "signatures"
  355. inserted by ASD, usually before building descriptions, and not intended to be
  356. executed: they are probably only a help for the editor to recognize the kind
  357. of object; Steve Turley advised me that record 0Bh is used in SEE files to
  358. skip over ASCII "comments".
  359.  
  360. Both kinds of non-SDL embedded material make the life difficult for scenery
  361. parsing utilities; the only way I found to deal with them is to keep track of
  362. referenced record addresses and to skip to the given byte offset if the
  363. address of the record after the 0Bh record is not referenced by any previous
  364. SDL statement, but caveat: some backward byte offset have been detected in
  365. F1.
  366.  
  367. -- 0Ch ------------- ??? (3 bytes)
  368.  
  369. Used only twice (at offsets 00BBF1 and 00D8E5) in F1, always after a 2Eh
  370. record and always in the form:
  371.           2E 09 80  0C 05 50
  372.  
  373. -- 0E/8Eh ---------- Delayed subroutine call (3 bytes)
  374.  
  375. 1         2    byte offset
  376.  
  377. This record has been one of most difficult to understand.  It is basically a
  378. subroutine call, but the referenced address is not called immediately, it is
  379. collected in some kind of stack; at some point, presumably during the execu-
  380. tion of a 79h record, all the collected routines are sorted in order of
  381. decreasing distance of the object they draw from the view point and executed.
  382. For the sorting to be effective, referenced routines have to begin with a ref
  383. point record (24h); if a routine lacks this record, it is executed first.
  384.  
  385. This record is extensively used to collect groups of routines drawing build-
  386. ings and other elevated objects and provides a simple way to draw them in a
  387. perspective correct fashion.
  388.  
  389. Record 0Eh is consistently used in .SC1 files in a way that makes such a
  390. behaviour very unclear, because each 0Eh, in .SC1, is followed by a 0Bh
  391. record which jumps over the routine referenced in the 0Eh record; sometime
  392. between the routine proper and the 0Bh record a 2-byte "signature" is
  393. enclosed (see above, under 0Bh record).
  394.  
  395. Not used in SC-EUR.
  396.  
  397. -- 0Fh ------------- ??? (6 bytes)
  398.  
  399. Used 49 times in F1.
  400.  
  401. -- 10h ------------- Hidden surface check (5 bytes)
  402.  
  403. 1         2    byte offset
  404. 3         1    point number
  405. 4         1    control vector number
  406.  
  407. Not fully understood.  This record jumps to the given offset if the point
  408. which number is given in byte 3 is aligned in some fashion, from the current
  409. view point, with the control vector which number is given in byte 4.
  410.  
  411. The point has been previously defined by a record 31h and the vector has been
  412. defined by a record 27h.  Practically, if the vector is defined correctly,
  413. the record 10h checks if the surface associated with the vector is visible or
  414. not from the current view point.  See also discussion of record 27h.
  415.  
  416. -- 12h ------------- Line Colour (2 bytes)
  417.  
  418. 1         1    colour code from the following table:
  419.  
  420.                0         Black
  421.                1         Dark Green
  422.                2         Dark Blue
  423.                3         Dark Cyan
  424.                4         Orange
  425.                5         Light Grey
  426.                6         Light Blue
  427.                7         Cyan
  428.                8         Brown
  429.                9         Yellow
  430.                Ah        Dark Grey
  431.                Bh        Light Green
  432.                Ch        Red
  433.                Dh        Gold
  434.                Eh        (apparently not used/transparent?)
  435.                Fh        White
  436.  
  437. -- 13h ------------- Daytime line colour (10 bytes)
  438.  
  439. 1         1    line colour for day time
  440. 2         1    line colour for dawn time
  441. 3         1    line colour for night time
  442. 4         3    second colour triplet
  443. 7         3    third colour triplet
  444.  
  445. This record applies to following lines different colours for different
  446. daytimes; its effect ceases at the next 12h record.
  447.  
  448. In F1, the second and third colour triplets are filled with consistent pat-
  449. terns of colours, but, during my tests, their colours never shown up nor
  450. affected in any way the first three.
  451.  
  452. -- 14h ------------- Daytime surface colour (10 bytes)
  453.  
  454. 1         1    surface colour for day time
  455. 2         1    surface colour for dawn time
  456. 3         1    surface colour for night time
  457. 4         3    second colour triplet
  458. 7         3    third colour triplet
  459.  
  460. All colour codes are repeated in both nibbles.
  461.  
  462. This record applies to following surfaces different colours for different
  463. daytimes; its effect ceases when variable 02E2h is set by a 25h record.
  464.  
  465. In F1, the second and third colour triplets are filled with consistent pat-
  466. terns of colours, but, during my tests, their colours never shown up nor
  467. affected in any way the first three.
  468.  
  469. -- 15h ------DS----- Axis roto-translation (15 bytes) =SEE=
  470.  
  471. 1         2    angle around E axis
  472. 3         2    angle around N axis
  473. 5         2    angle around A axis
  474. 7         2    delta E (delta FSu)
  475. 9         2    delta A (delta FSu)
  476. 11        2    delta N (delta FSu)
  477. 13        2    byte offset
  478.  
  479. The same observations made for record 16h apply to this record also.  With
  480. it, local coordinate system is both rotated and translated.
  481.  
  482. -- 16h ------------- Axis rotation (9 bytes)
  483.  
  484. 1         2    angle around E axis
  485. 3         2    angle around N axis
  486. 5         2    angle around A axis
  487. 7         2    byte offset
  488.  
  489. This record is one of the most ingenuous: it applies to the local coordinate
  490. system (used for delta FSus, and by default centered in the ref. point and
  491. parallel to global axes) the described rotations, then it calls the
  492. referenced subroutine: anything (not only buildings) drawn by this routine
  493. with delta coords. will appear rotated; when the subroutine returns, the
  494. coordinate system is restored.  The record can be used to display tilted
  495. objects with a very small code overhead.
  496.  
  497. -- 17h ------------- Return17 (1 byte)
  498.  
  499. This single byte record returns from a subroutine; its difference from record
  500. 19h is not clear.
  501.  
  502. In .SC1 it has been observed only in timing gate definitions, but in F1 it is
  503. used 27 times in various contexts.
  504.  
  505. -- 18h ------------- Call18 (3 bytes)
  506.  
  507. 1         2    byte offset (subroutine address)
  508.  
  509. Calls a subroutine; its difference from record 1Fh is not clear.  Used 624
  510. times in F1.
  511.  
  512. -- 19h ------------- Return19 (1 byte)
  513.  
  514. This single byte record returns from a subroutine; its difference from record
  515. 17h is not clear. Used 312 times in F1.
  516.  
  517. -- 1Ah ------------- Equ var (5 bytes)
  518.  
  519. 1         2    var1 address
  520. 3         2    var2 address
  521.  
  522. Very probably, this record set var1 to the value of var2.
  523.  
  524. -- 1Bh ------------- Line night colour on (1 byte)
  525.  
  526. This record set the night and dawn colours of following lines to a standard
  527. colour (in FS4, light blue).  Its effect ceases with the next record 12h.
  528.  
  529. -- 1Ch ------------- Line night colour off (1 byte)
  530.  
  531. Restores the night and dawn colours of following lines to the same colour
  532. used for day.
  533.  
  534. -- 1Dh ------------- VOR (11 bytes)
  535.  
  536. 1         2    frequency; BCD coded (ex.: 109.15 MHz -> 15h 09h)
  537. 3         4    E coord. (fract. FSu)
  538. 7         4    N coord. (fract. FSu)
  539.  
  540. -- 1Eh xxxx -------- ATC message (xxxx bytes)
  541.  
  542. 1         2    record length
  543. 3         2    frequency; BCD coded (ex.: 127.15 MHz -> 15h 27h)
  544. 5         4    4 runway numbers (often repeated)
  545. 9         4    ??
  546. 13        var  message text (0-terminated)
  547.  
  548. The message text can include any character from ASCII 20h to ASCII 93h.
  549. Characters greater than 93h result in garbage being transmitted. When the
  550. message is played back, characters from 80h to 93h are expanded into the fol-
  551. lowing strings (stored in ATC.FS4):
  552.  
  553. 80h       " Whether - "
  554. 81h       " OBSERVATION "
  555. 82h       " XX:00 ZULU " (where XX is replaced by the current hour time)
  556. 83h       "" (empty string)
  557. 84h       " TEMPERATURE 25 - "
  558. 85h       " INFORMATION "
  559. 86h       " LANDING AND DEPARTING RUNWAY XX - " (where XX is replaced by the
  560.           runway number given at offset 5)
  561. 87h       " ADVISE CONTROLLER "
  562. 88h       " ALTIMETER 29.95 - "
  563. 89h       " VISIBILITY 10 - "
  564. 8Ah       " WIND XXX at YY - " (where XXX and YY are replaced by wind
  565.           direction and speed defined by the wind menu or generated by the
  566.           weather generator; if both are off, this character is ignored)
  567. 8Bh       " MEASURED CEILING 00600 OVERCAST "
  568. 8Ch       "" (empty string)
  569. 8Dh       "" (empty string)
  570. 8Eh       "Microsoft Flight Simulator"
  571. 8Fh       " requesting "
  572. 90h       "clearance "
  573. 91h       ", your are cleared "
  574. 92h       "... "
  575. 93h       "7777 "
  576.  
  577. -- 1Fh ------DS----- Call1F (3 bytes)
  578.  
  579. 1         2    byte offset (subroutine address)
  580.  
  581. Subroutine call; its difference from record 18h is not clear.  Used 192 times
  582. in F1.
  583.  
  584. -- 20h ------------- Jump if var outside (9 bytes)
  585.  
  586. 1         2    byte offset
  587. 3         2    var address
  588. 5         2    value1
  589. 7         2    value2
  590.  
  591. This record jumps over the given amount of bytes, if the value of the vari-
  592. able at the given address is outside the range value1 - value2.
  593.  
  594. -- 21h ------------- Jump if 2 vars outside (15 bytes)
  595.  
  596. 1         2    byte offset
  597. 3         2    var1 address
  598. 5         2    min1 value
  599. 7         2    max1 value
  600. 9         2    var2 address
  601. 11        2    min2 value
  602. 13        2    max2 value
  603.  
  604. This record jumps over the given amount of bytes, if var1 is outside the
  605. range min1 - max1 OR var2 is outside the range min2 - max2.
  606.  
  607. -- 22h ------------- Jump if 3 vars outside (21 bytes)
  608.  
  609. 1         2    byte offset
  610. 3         2    var1 address
  611. 5         2    var1 min value
  612. 7         2    var1 max value
  613. 9         2    var2 address
  614. 11        2    var2 min value
  615. 13        2    var2 max offset
  616. 15        2    var3 address
  617. 17        2    var3 min value
  618. 19        2    var3 max offset
  619.  
  620. This record is similar to the previous, but involves 3 variables.
  621.  
  622. -- 23h ------------- NAND Jump (7 bytes)
  623.  
  624. 1         2    byte offset
  625. 3         2    var address
  626. 5         2    value
  627.  
  628. Jumps if the bitwise AND of the given var value and the given value is 0.
  629.  
  630. -- 24h ------------- Reference point (14 bytes)
  631.  
  632. 1         1    scale factor
  633. 2         4    E coord. (fract. FSu)
  634. 6         4    AGL alt. (fract. FSu)
  635. 10        4    N coord. (fract. FSu)
  636.  
  637. A reference point record is a temporary coordinate origin for delta FSunits.
  638. It is used within the definitions of some kinds of object to define a point
  639. in 3D, near the center of the object; other points of the object are then
  640. defined relatively to this point.
  641.  
  642. Byte 1 is a scale factor determining delta unit magnitude:
  643.  
  644. Factor    1 delta unit is
  645.  
  646. 00        1/256 m
  647. 01        1/64 m
  648. 02        1/16 m
  649. 03        1/4 m
  650. 04        1 m
  651. 05        4 m
  652. 06        16 m
  653. 07        64 m
  654. 08        256 m (1 delta u = 1 FSu)
  655.  
  656. .SC1 files use only factor 04 (plus factor 02 in fuel boxes only); F1 uses
  657. factors 02, 04, 06, 08; all other factors have been tested manually.
  658.  
  659. -- 25h ------DS----- Set variable (5 bytes)
  660.  
  661. 1         2    variable address
  662. 3         2    new variable value
  663.  
  664. Sets the given variable to the given value.
  665.  
  666. -- 27h ------------- Define control vector (8 bytes)
  667.  
  668. 1         2    x coord
  669. 3         2    z coord
  670. 5         2    y coord
  671. 6         1    vector number
  672.  
  673. Defines a control vector related to a surface about to be drawn and assign to
  674. it a number in a point list; the vector so defined is afterward checked by a
  675. record 10h some way against one of the points of the object, if the check
  676. fails, a jump is triggered. Obviously, both records 10h and 27h are related
  677. to hidden surface removing, but I didn't understand the geometrical relation
  678. among the surface, the vector and the point, which can be similar to triangle
  679. vector of the 5Ah record.
  680.  
  681. -- 28 -------------- Compare vars (8 bytes)
  682.  
  683. 1         1    value:    condition:
  684.                02        var1 > var2 ?
  685.                04        var1 < var2 ?
  686. 2         2    byte offset
  687. 4         2    var1
  688. 6         2    var2
  689.  
  690. Jumps to the given byte offset if the condition is true.  Var values are
  691. treated as unsigned (8000h > 7FFFh).
  692.  
  693. In SC1 buildings, a record 28h in which condition value = 36h, var1 = 034Eh,
  694. var2 = FFFFh is often used; in this case, var2 is obviously a literal value,
  695. but the performed test is not clear.
  696.  
  697. -- 29h ------------- Close path (1 byte)
  698.  
  699. This record, made of the single byte 29h, is used to close a path being drawn
  700. with 40h and 41h records.  A line is drawn from the current point to the
  701. starting point of the last executed 40h record.  If the path begun with sur-
  702. face record (2Fh), the path is filled with the colour stored in var 02E2.
  703.  
  704. -- 2Ah ------------- Dotted line (14 bytes)
  705.  
  706. 1         2    P1 E coord. (delta FSu)
  707. 3         2    P1 A coord. (delta FSu)
  708. 5         2    P1 N coord. (delta FSu)
  709. 7         2    P2 E coord. (delta FSu)
  710. 9         2    P2 A coord. (delta FSu)
  711. 11        2    P2 N coord. (delta FSu)
  712. 13        1    Number of points / 2
  713.  
  714. This record draws a dotted line from P1 to P2, containing twice the number of
  715. points given at byte 13.
  716.  
  717. -- 2Bh ------------- Dashed line (14 bytes)
  718.  
  719. 1         2    P1 E coord. (delta FSu)
  720. 3         2    P1 A coord. (delta FSu)
  721. 5         2    P1 N coord. (delta FSu)
  722. 7         2    P2 E coord. (delta FSu)
  723. 9         2    P2 A coord. (delta FSu)
  724. 11        2    P2 N coord. (delta FSu)
  725. 13        1    Number of dashes
  726.  
  727. This record draws a dashed line from P1 to P2, containing the number of
  728. dashes given at byte 13.
  729.  
  730. -- 2Eh ------------- ??? (3 byte)
  731.  
  732. Used only twice (at offsets 00BBEE and 00D8E2) in F1, always after a 0Ch
  733. record and always in the form:
  734.           2E 09 80  0C 05 50
  735.  
  736. -- 2Fh ------------- Surface (1 byte)
  737.  
  738. This record, made of the single byte 2Fh, is used to start a surface
  739. perimeter.
  740.  
  741. When the perimeter is closed with 29h record, the surface is filled with the
  742. current colour.
  743.  
  744. -- 31h ------------- 3D-point (8 bytes)
  745.  
  746. 1         1    point number
  747. 2         2    E coord (delta FSu)
  748. 4         2    A coord (delta FSu)
  749. 6         2    N coord (delta FSu)
  750.  
  751. This record is used in F1 to define points in 3D. It also used in SC1
  752. mountain descriptions to set mountain vertices (peaks are numbered from 01h
  753. to 0Fh, base points from 21h inward).
  754.  
  755. -- 32h ------DS----- Move to 3D point (2 bytes)
  756.  
  757. 1         1    point number
  758.  
  759. Moves the pen (without drawing) to the point.  Point numbers have been set by
  760. a previous 31h record.
  761.  
  762. -- 33h ------DS----- Draw to 3D point (2 bytes)
  763.  
  764. 1         1    point number
  765.  
  766. Draws to the point.  Point numbers have been set by a previous 31h record.
  767.  
  768. -- 35h ------------- Dot (2 bytes)
  769.  
  770. 1         1    point number
  771.  
  772. Draws a dot at the given 3D point, prev. defined with a 31h record.
  773.  
  774. -- 36h ------------- ??? (2 bytes)
  775.  
  776. 1         1    always 00?
  777.  
  778. This record occurs only once in F1 and SC-EUR, each time at the end of the
  779. special INIT scenery procedure.
  780.  
  781. -- 3Bh ------------- Set elevation (5 bytes)
  782.  
  783. 1         4    elevation level (fract. FSu)
  784.  
  785. Set an elevation level above current ground level.  Used in F1 to make
  786. elevated 'solid' surfaces, like the carrier deck or the Golden Gate.
  787.  
  788. -- 3Ch ------------- ??? (4 bytes)
  789.  
  790. This record occurs only once in F1 and in each SCN, each time at the
  791. beginning of the special INIT scenery procedure.  Byte 2 contains the scenery
  792. number (FFh being the number of F1).
  793.  
  794. -- 3Dh ------------- Jump if outside area (19 bytes)
  795.  
  796. 1         2    byte offset
  797. 3         4    min E (fract. FSu)
  798. 7         4    max E (fract. FSu)
  799. 11        4    min N (fract. FSu)
  800. 15        4    max N (fract. FSu)
  801.  
  802. Jumps if current plane position (not the view point) is outside the delimited
  803. rectangular area.
  804.  
  805. -- 3Eh ------------- Jump if outside rectangle (Area record) (9 bytes)
  806.  
  807. 1         2    byte offset
  808. 3         2    N coord. (int FSu)
  809. 5         2    E coord. (int FSu)
  810. 7         2    area semi-side (int FSu)
  811.  
  812. Jumps if current plane position (not the view point) is outside the delimited
  813. rectangular area.  The record tests for a rectangular area not a circular
  814. one.
  815.  
  816. A 3Eh record starts the representation of each object in SC1 files and, in
  817. fact, it is the easiest way to avoid rendering an object if the aircraft is
  818. too away from it; however, as for any SDL record, it is a procedural state-
  819. ment and does not define an object property, it is not even mandatory: many
  820. times, in F1, several related objects are grouped within a single 3Eh rec, or
  821. a complex object is broken in many independently displayed parts.  Sometimes,
  822. it is totally absent and the visibility of the object is checked by others
  823. ways.
  824.  
  825. -- 40/C0h ---------- Move to 2D point (5 bytes)
  826. -- 41h ------------- Draw to 2D point (5 bytes)
  827.  
  828. 1         2    E coord. of the point (delta FSu)
  829. 3         2    N coord. of the point (delta FSu)
  830.  
  831. Move and draw records are used to draw line segments.  A move record moves to
  832. the point given in the record without drawing anything, a draw record draws a
  833. line segment or a polygon boundary from the previous point to the given
  834. point.  Within SC1 files, Move record code can be either 40h or C0h, without
  835. any visible difference.
  836.  
  837. All coords are delta coords and are relative to a previously given ref. point
  838. record.
  839.  
  840. -- 42h ------------- Jump if outside area (11 bytes)
  841.  
  842. 1         2    byte offset
  843. 3         2    min E (int. FSu)
  844. 5         2    max E (int. FSu)
  845. 7         2    min N (int. FSu)
  846. 9         2    max N (int. FSu)
  847.  
  848. Jumps if current plane position (not the view point) is outside the delimited
  849. rectangular area.  The test only succeds if the map view is on.
  850.  
  851. -- 43h ------------- ??? (29 byte)
  852.  
  853. 1         2    byte offset
  854. 3         4    E coord (fract FSu)
  855. 7         4    A coord (fract FSu)
  856. 11        4    N coord (fract FSu)
  857. 15        14   ??
  858.  
  859. Used only 5 times in F1, 4 times after 00BF4C (around the Catalina I.) and 1
  860. time at 01E1E1 (within Oakland Int'l).  It seems to be a test based on some
  861. geometrical property of the given point.
  862.  
  863. -- 44h ------------- Define array of points (15 bytes)
  864.  
  865. 1         1    i, first point number
  866. 2         2    P1 E (delta FSu)
  867. 4         2    P1 A (delta FSu)
  868. 6         2    P1 N (delta FSu)
  869. 8         2    P2 E (delta FSu)
  870. 10        2    P2 A (delta FSu)
  871. 12        2    P2 N (delta FSu)
  872. 14        1    n, number of points
  873.  
  874. Defines n points, consecutively numbered from i onward and evenly distributed
  875. on the 3D segment from P1 to P2.  Used only 4 times in F1 to define the
  876. points for the 'net' on the side of the mountain in front of San Francisco.
  877.  
  878. -- 45h xxxx -------- Thermal generator (xxxx bytes)
  879.  
  880. 1         2    record length (0025h)
  881. 3         4    E coord of generator center (fract FSu)
  882. 7         4    altitude AGL of generator center ?
  883. 11        4    N coord of generator center (fract FSu)
  884. 15        2    orientation
  885. 17        1    ???
  886. 18        2    generator width (in m)
  887. 20        2    ???
  888. 22        2    thermal effect height (in feet)
  889. 24        2    ???
  890. 26        2    generator length (in m)
  891. 28        9    ???
  892.  
  893. This record has been found only in thermal generators.  Used 11 times in F1.
  894.  
  895. -- 49h ------------- Runway end lights (20 bytes)
  896.  
  897. 1         4    E coord (fract. FSu)
  898. 5         4    A coord (fract. FSu)
  899. 9         4    N coord (fract. FSu)
  900. 13        2    heading (in 182.04°)
  901. 15        1    light bits:
  902.                          0  end lights
  903.                          1  MALSR
  904.                          2  REIL
  905.                          3  VASI
  906.                          4  moving strobes
  907.                          5  ?? (irrelevant?)
  908.                          6  ?? (irrelevant?)
  909.                          7  ?? (irrelevant?)
  910. 16        1    moving strobe length (in ??)
  911. 17        2    VASI glide slope (in 1/10°)
  912. 19        1    ??
  913.  
  914. Places a runway end light system.
  915.  
  916. -- 4Ah ------------- Surface4A ?? (1 byte)
  917.  
  918. This single byte record is used to start a surface path; the difference with
  919. record 2Fh is not clear.  Used 8 times in F1.
  920.  
  921. -- 4Bh ------------- Jump4B ?? (3 bytes)
  922.  
  923. 1         2    byte offset
  924.  
  925. This record, used only once in F1, seems to be another jump instruction.  Its
  926. difference with record 0Bh is not apparent.
  927.  
  928. -- 4Ch ------DS----- ??? (2 bytes) =SEE=
  929.  
  930. -- 4Dh xxxx--DS----- ??? (xxxx bytes) =SEE=
  931.  
  932. 1         2    record length
  933. 3         4    E coord (fract FSu)
  934. 7         4    A coord (fract FSu)
  935. 11        4    N coord (fract FSu)
  936. 15        ??   ??
  937.  
  938. -- 4Eh ------DS----- ??? (4 bytes) =SEE=
  939.  
  940. -- 4Fh ------------- ILS (15 bytes)
  941.  
  942. 1         2    frequency; BCD coded (ex.: 109.15 MHz -> 15h 09h)
  943. 3         4    E coord. (fract. FSu)
  944. 7         4    N coord. (fract. FSu)
  945. 11        2    Approach course in 1/3° (0 -> 0, 359 -> 0435h)
  946. 13        2    Glide slope in 1/9100 (0 -> 0, 7.20 -> FFFFh)
  947.  
  948. -----
  949.  
  950. The following records, up to 79h excluded, are never used in F1 but only in
  951. SC1 files, either standard or SEE enhanced; they may be an ASD extension,
  952. which ASD itself recognizes and converts to SDL routines before feeding them
  953. to the SDL processor, or they may be part of the standard SDL.
  954.  
  955. -----
  956.  
  957. -- 50/D0h ---------- Runway (35 bytes) =SC1=
  958.  
  959. See below under runway description for details.
  960.  
  961. -- 51h ------------- Side list end (used in mountains, 1 byte) =SC1=
  962.  
  963. -- 52h ------DS----- ??? (2 bytes) =SEE=
  964.  
  965. -- 53h ------------- Building (variable) =SC1=
  966.  
  967. The building record defines the aspect of a building; its length and struc-
  968. ture varies according to the building type. Here a summary is given, see
  969. below, under building descriptions, for details.
  970.  
  971. 2nd byte                 building type and length
  972.  
  973. 01             Rectangular building record (18 [flat] and 19 [peaked] bytes)
  974. 02             L building record (24 [flat] and 27 [peaked] bytes)
  975. 03             T building record (28 [flat] and 32 [peaked] bytes)
  976. 04             U building record (28 [flat] and 33 [peaked] bytes)
  977. 05             H building record (34 [flat] and 41 [peaked] bytes)
  978. 06             Reversed L build. record (24 [flat] and 27 [peaked] bytes)
  979. 07             Control tower record (20 bytes)
  980. 29             Tower record (6 bytes)
  981. 33             Suspended bridge record (8 bytes)
  982. 34             Bridge record (8 bytes)
  983. 3D             Timing gate record (17 bytes)
  984. 42             Coniferous tree record (7 bytes)
  985. 43             Deciduous tree record (7 bytes)
  986. 47             Auto record (3 bytes)
  987. 4C             Multi-sided building record (13 bytes)
  988.  
  989. -- 58h ------DS----- 3D text (43 bytes) =SEE=
  990.  
  991. 1         7    ???
  992. 8         2    text size
  993. 10        32   text, 0-terminated
  994. 42        1    always 17h ?? (in that case, it could be another occurrence of
  995.                the 17h record)
  996.  
  997. -- 5Ah ------DS----- 3D-triangle (10 bytes) =SC1=
  998.  
  999. 1         2    E component of the "triangle vector" (see below)
  1000. 3         2    A component
  1001. 5         2    N component
  1002. 7         3    numbers of the 3 points, listed in anti-clockwise order
  1003.                looking to the triangle from outside
  1004.  
  1005. This record is used in mountains and is probably used to speed up the hidden
  1006. surface removing process.  The "triangle vector" is the cross product of the
  1007. vectors for the P2-P1 and the P3-P1 edges of the tiangle, the cross product
  1008. is then scaled so that no coord value is > 16383.  Point numbers at offset 7-
  1009. 9 correspond to mountain vertices defines in a previous list of 3D points
  1010. (list of 31h records).
  1011.  
  1012. -- 62h ------------- ??? (10 bytes) =SC1=
  1013.  
  1014. -- 6Fh ------DS----- ??? (11 bytes) =SEE=
  1015.  
  1016. -- 79h ------------- SDL End (1 byte)
  1017.  
  1018. Exits the SDL processor.  Used in SC1 only at the end of each section, within
  1019. F1 it occurs even in the middle of regions with a complex execution flow and
  1020. multiple exit points (SDL is not structured, after all!); it cannot be used
  1021. within subroutines, otherwise FS4 crashes.
  1022.  
  1023.  
  1024. ======================================================================
  1025.  
  1026.                           NOTES ON FILE STRUCTURES
  1027.  
  1028. GENERAL CONSIDERATIONS
  1029.  
  1030. Sceneries are organized in a 'layered' way, each procedure being a layer
  1031. (ground, runways and other signs on the ground, elevated objects like build-
  1032. ings, ...)  of a scenery region; layers are executed from the lowest to the
  1033. highest, each layer covering the previously drawn.
  1034.  
  1035. Procedure entry points are listed in the headers of SC1 files and of F1;
  1036. presumably such a table exists also within SCN files.
  1037.  
  1038. Sceneries must contain a way to determine to which region each procedure
  1039. belongs (to avoid executing the full scenery at each frame generation) and in
  1040. which order the layers of a region have to be drawn, but it has not been
  1041. determined yet.
  1042.  
  1043. Interaction between the base scenery and SC1 is complex: SC1 layers
  1044. (presumably corresponding to the nine SC1 sections) are not executed together
  1045. AFTER base scenery layers, because at least base scenery buildings are drawn
  1046. after some SC1 additions: one can imagine that ASD, after selecting the SC1
  1047. file appropriate to the current plane position, intercepts FS4 calls to the
  1048. SDL processor and intermixes calls to it passing the SC1 layers.
  1049.  
  1050. ----------
  1051.  
  1052. F1 HEADER
  1053.  
  1054. F1 begins with a header made of the elements listed below; given values come
  1055. from ver. 4.0b; in any case, a manually made test empty scenery based on his
  1056. structure has been accepted and executed by F4.
  1057.  
  1058. 0000      02DD           ??
  1059. 0002      00000106 0081  offset and length of the dialogue descriptor
  1060. 0008      00000187 0028  offset and length of the INIT procedure
  1061. 000E      00000000 0000  offset and length of UNKNOWN1
  1062. 0014      00000000 0000  offset and length of UNKNOWN2
  1063. 001A      00000000 0000  offset and length of UNKNOWN3
  1064. 0020      0026           number of scenery procedures
  1065.  
  1066. Then, a table is given with, for each scenery region:
  1067.  
  1068.           oooooooo llll  offset and length of each procedure
  1069.  
  1070. Table ends at 0106h. A descriptor of the dialogue window displayed when the
  1071. scenery is selected follows, each text line is described by:
  1072.  
  1073.           01 xxxx yyyy 00 "line text " 00 00
  1074.  
  1075. xxxx and yyyy being the video coordinates of the line starting point, in some
  1076. sort of device independent unit of measure.  A record:
  1077.  
  1078.           00
  1079.  
  1080. marks the end of the descriptor.
  1081.  
  1082. The dialogue is followed by what has been conventionally called the INIT pro-
  1083. cedure:
  1084.  
  1085. 0187      3C 00 FF 28         ???
  1086. 018B      21 0012             Jump to 019D if
  1087.              0000 F470 FD80      var 0000 outside F470-FD80 or
  1088.              0000 D972 E312      var 0000 outside D972-E312
  1089. 019A      0B 0012             Jump to 01AC
  1090. 019D      21 0012             Jump to 01AF (addr. of the 1st procedure) if
  1091.              0000 EFEC FB8C      var 0000 outside EFEC-FB8C or
  1092.              0000 E312 EBEC      var 0000 outside E312-EBEC
  1093. 01AC      36 00               ???
  1094. 01AE      79                  END SDL Processor
  1095.  
  1096. After that, at 01AF, the first scenery procedure begins.
  1097.  
  1098. The INIT procedure has been so called because it obviously enjoys a particu-
  1099. lar status, having a pointer reserved to it in the header.  Records 3C and 36
  1100. occur only there and therefore their meaning is difficult to identify.  The
  1101. routine itself is syntactically correct (known records follow the standard
  1102. structures and referenced address correspond to record addresses) but the
  1103. reference to var 0000 is surprising at least.
  1104.  
  1105. ----------
  1106.  
  1107. NOT ON SCN FILES
  1108.  
  1109. SCN files have a very different structure than F1.  Generally speaking, the
  1110. SCN structure seems to be an old leftover of the time when sceneries were
  1111. loaded from floppy disks without the a secure DOS aid (FS was an auto-booting
  1112. protected program).
  1113.  
  1114. 0000-01FF      Only garbage: some files contain a boot-strap sector, other
  1115.                just a lot of 79h records.
  1116. 0200-02FF      Still garbage or some initialisation values for FS variables
  1117. 0300-03FF      The first bytes contain the INIT procedure, with the same
  1118.                structure of F1's INIT (3Ch record, tests, 36h record, 79h
  1119.                record), but different test values (some SCN contain more than
  1120.                2 tests); the last test points beyond the 79h record where no
  1121.                SDL code lies.  The remaining part of this area does not have
  1122.                any apparent sense.
  1123. 0400-....      Here the scenery proper begins.
  1124.  
  1125. Scenery procedures are not consecutive, as in F1 and SC1, but, after the end
  1126. of a procedure, the file is padded with garbage until the next kB boundary,
  1127. where the next procedure begins.
  1128.  
  1129. Sector 116 (beginning at 00E800h) contains the dialogue descriptor, with a
  1130. similar but not identical structure to F1 dialogue's.  It is well possible
  1131. that in this area lies the procedure table also, but I was not able to find
  1132. it.
  1133.  
  1134. Given that SCN structure is obscure, contains a lot of padding garbage and is
  1135. probably a relic of the past, I actually don't see any compelling reason to
  1136. go significantly beyond the above outline, which, at any rate, makes possible
  1137. a more or less easy, but complete, parsing of SCN files.
  1138.  
  1139. It is worth noting also that a file may have an .SCN extension and still use
  1140. the F1 structure, because FS4 correctly recognizes and executes F1 even if it
  1141. is renamed with an .SCN extension.
  1142.  
  1143. ==================== FSSTRUCT.ADD END ====================
  1144.